package linwen.wang.service.impl;

import linwen.wang.annotation.WR;
import linwen.wang.entity.User;
import linwen.wang.mapper.UserMapper;
import linwen.wang.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author zero
 * @DATE 2024/4/23 2:45 AM
 * @Version 1.0
 */

@Service
@Slf4j
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;


    @Override
    @WR("R")
    public User getUserById(Long id) {
        return userMapper.selectById(id);
    }

    @Override
    public void insertUser(User user) {
        userMapper.insert(user);
    }
}
